package com.juntuo.task;

import com.juntuo.service.XjChickService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ClearLimitTask {

    @Autowired
    private XjChickService xjChickService;
    @Scheduled(cron = "0 0 0 * * ?")//每分钟都执行
    public void execute(){
        xjChickService.updateAllLimit();
        System.out.println("执行");
    }
}
